<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>假设两个整数 a 和 b ，找出其最大公约数</title>
	</head>
	<body>
		<script type="text/javascript">
			function fn(i, j){
				// r = 0
				let r = i % j
				// i = 3
				i = j
				// j = r = 0
				j = r
				if(r == 0){
					return i
				}
				fn(i, j)
			}
			console.log(fn(15, 3));
		</script>
	</body>
</html>
